from flask import Flask, make_response,jsonify
#返回json数据给网页前端
app = Flask(__name__)
app.config['JSON_AS_ASCII'] = False
@app.route('/index')
def index():
    data = {
        'name': '张三'
    }
    #return make_response(json.dumps(data,ensure_ascii=False))
    #response.mimetype = 'application/json'
    #return response
    return jsonify(data)

if __name__ == '__main__':
    app.run(debug=True)